﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Shapes;

namespace TreeBuilder
{
    public class TriangleAdorner : EllipseAdorner
    {
        public TriangleAdorner(UIElement adornedElement) : base(adornedElement)
        {}

        protected override void OnRender(System.Windows.Media.DrawingContext drawingContext)
        {
            if (!IsActive) return;
            var triangle = (Polyline) AdornedElement;
            var points = triangle.Points.ToArray();
            DrawPoints(points, drawingContext);
        }
    }
}
